function writeCoords()
{
  window.onload = function()
  {
    var x=0;
    var y=0;

    navigator.geolocation.getCurrentPosition(showPosition);
    
    function showPosition(position)
      {
         x = position.coords.latitude;
         y = position.coords.longitude;
        document.forms[0].latitude.value = "5";
        document.forms[0].longitude.value = y;
    }

  }
}

